A dynamic programming language is one that at runtime executes behaviors that a static language typically either does not perform at all or performs during compilation. The behaviors executed at runtime by a dynamic language can include extension of the program by adding new code, extension of the program by extending objects and definitions, or by modifying the type system. In a dynamic programming language, information not available at compile time can significantly alter how the program executes. For example, in a static program, when a variable is declared in the source code, the declaration specifies the type of the variable: variable x is an integer, or variable x is a string, etc. If variable x is an integer, adding x to an integer constant will invoke an arithmetic add. If variable x is a string, adding x to a constant that is a string will invoke a concatenation of the constant and x. In a dynamic programming language, the type of the variable is not known until the program executes, so additional code paths are needed to handle the different types of add operations, adding overhead to program execution.
Examples of languages generally considered to be dynamic languages include but are not limited to: ActionScript, BASIC, BeanShell, ColdFusion, Common Lisp and some other Lisp languages, Groovy, E programming languages; JavaScript, VBScript, MATLAB, Lua, Objective-C, Perl, PHP, Powershell, Python, Ruby, Smalltalk, Tcl and Dolphin Smalltalk.